home *** CD-ROM | disk | FTP | other *** search
- Skeleton Format for MASM Main Programs
-
- ; DESC: description of the program VX.XX
-
- where X.XX is the version number of the program
-
- ; IN: *input parameter1 (one to a line)
- ; *input parameter2
- ; .................
- ; *input parametern
- ; OUT: *output parameter1 (one to a line)
- ; *output parameter2
- ; ..................
- ; *output parametern
- ; SAMPLE: Program name <input parameter1,ip2,...,ipn>,
- ; <output parameter1,op2,..,opn>
- ; ####################################################################
-
-
- DSEG Segment Para Public 'DATA'
-
- where DSEG is the program name with a 'D' appended to it.
- and the last letter of the program name is dropped if it
- is 8 characters.
-
- help block1 in the format of a call to TEXT_WRT (five words)
- help block2 (segment address of licence block, one word)
-
- DW 0 ;help message.
- DW 0
- DD MHELP
- DW EHELP
- MHELP DB 'reiterate description as at top'
- EHELP DB 0
-
- additional program data
-
- DSEG Ends
-
-
- declaration of external procedures
-
-
-
- CSEG Segment Para Public 'CODE'
-
- where CSEG is the
- code segment in the same format as the data segment except
- with a 'C' in place as the 'D'.
-
- Assume CS:CSEG,DS:DESG
-
- macro calling program
-
- Include CALLM.MAC ;macro file which allows
- ;input and output of
- ;parameters to subroutines.
- data area
-
- DW 0,0,0,180,0,0,0
-
- notice which must be 48 characters exactly and must be
- directly before the main program.
-
- DB 'program name - V1.00, Copyright 1987, CoreTechs ',0DH,0AH
-
- program Proc Far ;main procedure.
-
- where program is the name of the program
-
- Push DS ;store return address.
- Xor AX,AX
- Push AX
-
- main program body
-
- program Endp
- CSEG Ends
- End program